<?php
// change the following paths if necessary
$yii=dirname(__FILE__).'/../yii-framework/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';

// Determine whether we're working on a local server or on the real server:
if (isset($_SERVER['HTTP_HOST'])) {
    if (stristr($_SERVER['HTTP_HOST'], 'local') || (substr($_SERVER['HTTP_HOST'], 0, 7) == '192.168')) {
        $local = true;
    } else {
        $local = false;
    }
} else {
    $local = true;
}

if ($local) {
	define('YII_DEBUG', true);
	// specify how many levels of call stack should be shown in each log message
	defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
} else {
	define('YII_DEBUG', false);
}

require_once($yii);
Yii::createWebApplication($config)->run();
